bitkeeper revision 1.1159.187.19 (41a65822miLPeexZ6MOkyk4Usl-Rpw)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Thu, 25 Nov 2004 22:09:38 +0000 (22:09 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Thu, 25 Nov 2004 22:09:38 +0000 (22:09 +0000)
Fix multicall preemption.

xen/common/multicall.c

index dfe5e8d69165ed1724289dd2425c162549a9e2ed..04605ebb2aa0f014756b47d5db304d561eb83b7a 100644 (file)
@@ -52,9 +52,15 @@ long do_multicall(multicall_entry_t *call_list, unsigned int nr_calls)
 
         if ( hypercall_preempt_check() )
         {
-            /* If the sub-call wasn't preempted, skip over it. */
+            /*
+             * Copy the sub-call continuation if it was preempted.
+             * Otherwise skip over the sub-call entirely.
+             */
             if ( !test_bit(_MCSF_call_preempted, &mcs->flags) )
                 i++;
+            else
+                (void)__copy_to_user(&call_list[i], &mcs->call,
+                                     sizeof(*call_list));
 
             /* Only create a continuation if there is work left to be done. */
             if ( i < nr_calls )